package com.example.design.observer;

public class ConcreteAllyControllerCenter extends AllyControllerCenter {
	public ConcreteAllyControllerCenter(String name) {
		System.out.println(name + "组建战队成功！");
		System.out.println("-----------------------");
		this.allyName = name;
	}
	
	public void notifyObserver(String name) {
		System.out.println(this.allyName + "战队紧急通知， 盟友" + name + "收到攻击");
		for(Observer obs : players) {
			if(!obs.getName().equalsIgnoreCase(name)) {
				obs.help();
			}
		}
	}
}
